import { Store } from 'vuex'

export type routerState = {
  expandRouterName: { to: string; from: string } | null
  reloadPage: boolean
}

let state: routerState = {
  expandRouterName: null,
  reloadPage: false
}
let getters = {
  expandRouterName(state: any) {
    return state.expandRouterName
  }
}
let mutations = {
  expandRouterName(state: any, expandRouterName: { to: string; from: string } | null) {
    state.expandRouterName = expandRouterName
  },
  setReloadPage(state: routerState, reload: boolean) {
    state.reloadPage = reload
  }
}
let actions = {}
export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}
